﻿[%^Main%]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Vatgia Travel CMS</title>
<link href="~/../style/reset.css" rel="stylesheet" type="text/css" />
<link href="~/../style/file.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript" src="~/../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" language="javascript" src="~/../js/file.js"></script>
<script type="text/javascript" language="javascript" src="~/../js/jquery.tooltip.pack.js"></script>
<script type="text/javascript" language="javascript">
	$(document).ready(function(){
		$('.fileURL').tooltip({ 
			delay: 0, 
			showURL: false,
			width: 300,
			bodyHandler: function() { 
				return $("<img/>").attr("src", $(this).attr('rel')); 
			} 
		});													 
	});

    function ToggleSelect() {
        if ($('.fileID:visible:checked').size() == 0) {
            $('.fileID:visible').attr('checked', 'checked');
        } else {
            $('.fileID:visible').removeAttr('checked');
        }
    }

	function SelectFile(url){
		var returnObject = '{{returnObject}}';
		window.opener.$('#' + returnObject).val('{{webcmsPath}}{{fullPath}}' + url);
		window.opener.$('a.' + returnObject).attr('href', '~/..{{fullPath}}' + url);
		window.close();	
	}
	
	function DeleteFile(url){
		Ajax('file&action=delete', 'fileURL=' + url, function(data){ window.location.reload(); })
	}
</script>
<!--[if IE 5]>
<style type="text/css"> 
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css"> 
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
</head>
<body class="twoColFixLtHdr">
<div id="container">
  <div id="header" class="clearfix"> <span>{{#DRFMS}}</span>[%^LanguageFlag%]
    <div id="language">[%^LanguageFlagItem%]<a href="javascript:void(0);" class="language" onclick="javascript:ChangeLanguage('{{langCode}}');"><img src="~/../images/{{langCode}}.png" alt="{{langName}}" /></a>[%$LanguageFlagItem%] </div>
    [%$LanguageFlag%]
    <form id="searchForm" action="file.aspx" method="post">
      <p>
        <label for="search">{{#Search}}</label>
        <input type="text" id="search" name="search" value="{{searchValue}}" style="text-align:left;" />
      </p>
    </form>
  </div>
  <div id="folder">
    <ul>
      <li><a href="file.aspx?type=audio&return={{returnObject}}">{{#Audio}}</a></li>
      <li><a href="file.aspx?type=compressed&return={{returnObject}}">{{#Compressed}}</a></li>
      <li><a href="file.aspx?type=document&return={{returnObject}}">{{#Document}}</a></li>
      <li><a href="file.aspx?type=file&return={{returnObject}}">{{#OtherFiles}}</a></li>
      <li><a href="file.aspx?type=image&return={{returnObject}}">{{#Image}}</a></li>
      <li><a href="file.aspx?type=video&return={{returnObject}}">{{#Video}}</a></li>
    </ul>
  </div>
  <div id="mainContent">
  	<a href="file.aspx?type={{uploadToFolder}}&action=upload&return={{returnObject}}" class="button" id="uploadButton">{{#Upload}}</a>
    <div id="table">
      <table class="mainTable">
        <thead>
          <tr>
            <th width="6%"><a href="javascript:void(0);" onclick="ToggleSelect();">{{#Select}}</a></th>
            <th width="*">{{#Title}}</th>
            <th width="15%">{{#Size}}</th>
            <th width="15%">{{#Date}}</th>
            <th width="13%">{{#Action}}</th>
          </tr>
        </thead>
        [%^Table%][%^Paging%]
        <tfoot>
          <tr>
            <td colspan="5">
            	<ul class="paging">
                <li class="info">{{#Page}} <strong>{{currentPage}}</strong> / {{totalPage}} ({{totalRecord}} {{#Record}})</li>[%^PagingPrevious%]
                <li><a href="file.aspx?page=1{{searchInfo}}&return={{returnObject}}">&laquo;</a></li>
                <li><a href="file.aspx?page={{pageIndexPrevious}}{{searchInfo}}&return={{returnObject}}">&lsaquo;</a></li>[%$PagingPrevious%][%^PagingItem%]
                <li><a href="file.aspx?page={{pageIndex}}{{searchInfo}}&return={{returnObject}}"{{currentPageStyle}}>{{pageIndex}}</a></li>[%$PagingItem%][%^PagingNext%]
                <li><a href="file.aspx?page={{pageIndexNext}}{{searchInfo}}&return={{returnObject}}">&rsaquo;</a></li>
                <li><a href="file.aspx?page={{totalPage}}{{searchInfo}}&return={{returnObject}}">&raquo;</a></li>[%$PagingNext%]
              </ul>
						</td>
          </tr>
        </tfoot>
        <tbody>[%$Paging%]
        [%^TableItem%]
        <tr>
          <td><input type="checkbox" class="fileID" name="fileID" value="{{fileID}}" /></td>
          <td><a href="javascript:void(0);" rel="~/..{{fileURL}}" class="fileURL" onclick="SelectFile('{{fileURL}}');">{{fileName}}</a></td>
          <td>{{fileSize}}</td>
          <td>{{fileDate}}</td>
          <td align="center"><a href="javascript:void(0);" onclick="DeleteFile('~/..{{fileURL}}');">{{#Delete}}</a></td>
        </tr>
        [%$TableItem%]
        </tbody>
        [%$Table%]
      </table>
    </div>
    [%^ActionForm%]
    <div id="action">
      <form id="actionForm" action="user.aspx" method="post">
        <p>
          <select id="actionSelect" name="actionSelect" style="width:100px;">
            <option value="">{{#Select}}</option>
            <option value="delete">{{#Delete}}</option>
          </select>
          <input type="button" value="{{#Apply}}" onclick="Action();" />
        </p>
      </form>
    </div>
    [%$ActionForm%] </div>
  <div class="clearfix"></div>
  <div id="footer">{{#CopyrightText}}</div>
</div>
</body>
{{errorCode}}
</html>
[%$Main%]